package net.plankton.mjpeg;

import net.plankton.controller.Protocol;

public class MJpegProtocol implements Protocol {

	int count=0;
	String ip=null;
	String dir=null;
	
	public void command(String line) {
		System.err.println(line);
		switch (count) {
		case 0:
			ip=line.trim();
			break;
		case 1:
			dir=line.trim();
			new MovieLoader(ip,dir).start();
		}
		count++;
	}

	public String getName() {
		return "MJPEG";
	}

	public Protocol clone() {
		return new MJpegProtocol();
	}
	
}
